<%@ Page Language="C#" AutoEventWireup="true" Codebehind="ModifyPWD.aspx.cs" Inherits="BaseSystem.ModifyPWD" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Modify Password</title>
    <link href="../Style/Global.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
    function CheckPwd(){

        if(GetEle("txtOldPwd").value == "")
        {
            alert("Original Password Is Empty");
            GetEle("txtOldPwd").focus();
            return false;
        }
        else if(GetEle("txtNewPwd").value == "")
        {
            alert("New Password Is Empty");
            GetEle("txtNewPwd").focus();
            return false;
        }        
        else if(GetEle("txtNewPwd").value.length  < 8)
        {
            alert("Password length at least 8 characters");
            GetEle("txtRetypePwd").focus();
            return false;
        }
        else if (GetEle("txtNewPwd").value.length > 16)
        {
            alert("Password length is more than 16 characters");
            GetEle("txtRetypePwd").focus();
            return false;
        }
        else if (GetEle("txtNewPwd").value != GetEle("txtRetypePwd").value)
        {
            alert("Password do not match");
            GetEle("txtRetypePwd").focus();
            return false;
        }
        else
        {
            return true;
        }
        
    }
    function GetEle(ID)
    {
        return document.getElementById(ID);
    }
    </script>

</head>
<body style="padding-top:10px;">
    <form id="form1" runat="server" >
    
        <div>
            <table border="1" style=" width: 326px;" cellpadding="1"
                cellspacing="1" class="borderStyle">
                <tr>
                    <td colspan="2" style="background-color: #e7f5ff; font-weight: bold; padding-left: 5px; font-size:20px; border-color:Blue; padding-bottom:2px; color:#0066CC;">
                        <%=Resources.Base.ModifyPWD%>
                        </td>
                </tr>
                <tr style="padding-top:50px;">
                    <td class="table_body" nowrap="nowrap">
                     <%=Resources.Base.UserID%>/<%=Resources.Base.UserName%></td>
                    <td class="table_none" nowrap="nowrap">
                        <asp:Label ID="lblUserID" runat="server" Font-Bold="True" Font-Underline="True" Font-Size="15px"
                            Height="22px"></asp:Label>
                        <asp:Label ID="lblUserName" runat="server" Font-Bold="True" Font-Underline="True"
                            Font-Size="15px" Height="22px"></asp:Label></td>
                </tr>
                <tr>
                    <td class="table_body" nowrap="nowrap">
                       <%=Resources.Base.OrgPWD%> </td>
                    <td class="table_none" nowrap="nowrap">
                        <asp:TextBox ID="txtOldPwd" runat="server" TextMode="Password"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="table_body" nowrap="nowrap" style="width: 116px;">
                      <%=Resources.Base.NewPWD%>  </td>
                    <td class="table_none" nowrap="nowrap">
                        <asp:TextBox ID="txtNewPwd" runat="server" TextMode="Password"></asp:TextBox>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td class="table_body" nowrap="nowrap">
                      <%=Resources.Base.NewPWDConfirm%>  </td>
                    <td class="table_none" nowrap="nowrap">
                        <asp:TextBox ID="txtRetypePwd" runat="server" TextMode="Password"></asp:TextBox>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td class="table_none" nowrap="nowrap" colspan="2" style="text-align:center">
                        <asp:Button ID="btnConfirm" OnClientClick="return CheckPwd()" runat="server" CssClass="button_bak"
                            Text="<%$Resources:Base,Modify%>" OnClick="btnConfirm_Click" />
                        <input id="btnReset" class="button_bak" type="reset" value="<%=Resources.Base.Reset%>" />
                    </td>
                </tr>
            </table>
        </div>
    </form>
</body>
</html>
